<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>

    let str = "";

    const reg=/<li>.*?<a>(.*?)<\/a>.*?<p>(.*?)<\/p>/sg

    const res = str.matchAll(reg);

    console.log(res);

    for (let re of res) {
        console.log(re);
    }

    const resArr = [...res];
    console.log(resArr);

</script>
</body>
</html>
